package com.fm.magic;

import com.fm.base.database.Database;
import com.fm.base.database.domain.DBList;
import com.fm.base.database.domain.DBSortedDocument;
import com.fm.mongodb.client.MongodbClient;
import com.fm.mongodb.client.codec.DBLinkedDocumentCodecProvider;
import com.fm.mongodb.client.codec.DBLinkedListCodecProvider;
import com.fm.mongodb.client.codec.DBSortedDocumentCodecProvider;
import com.fm.mongodb.client.codec.DateTimeCodecProvider;

public class Factory {
    public static MongodbClient getLocalProxiesDB() {
        return new MongodbClient(Database.LOCAL_PROXIES,
            new DBLinkedDocumentCodecProvider(),
            new DBSortedDocumentCodecProvider(),
            new DBLinkedListCodecProvider(),
            new DateTimeCodecProvider());
    }

    public static MongodbClient getTestMongodb() {
        return new MongodbClient(Database.LOCAL_TEST,
            new DBLinkedDocumentCodecProvider(),
            new DBSortedDocumentCodecProvider(),
            new DBLinkedListCodecProvider(),
            new DateTimeCodecProvider()
        );
    }

    public static DBSortedDocument createDBSortedDocument() {
        return new DBSortedDocument();
    }

    public static DBList createDBList() {
        return new DBList();
    }
}
